package com.cetc.sdp.kmga.cs.device;

/**
 * @description:
 * @author： DengQiang
 * @date: 2017/8/29 10:44
 */
public class DeviceExpEvent {

    /**
     * 异常id
     */
    private int id;

    /**
     * 异常类型编码
     */
    private int excpCode;

    /**
     * 设备id
     */
    private String deviceId;

    /**
     * 异常详细信息
     */
    private String detail;

    /**
     * 起始时间
     */
    private String startTime;

    /**
     * 结束时间
     */
    private String endTime;

    /**
     *
     */
    private int level;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getExcpCode() {
        return excpCode;
    }

    public void setExcpCode(int excpCode) {
        this.excpCode = excpCode;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        DeviceExpEvent expEvent = (DeviceExpEvent) o;

        if (excpCode != expEvent.excpCode) return false;
        return deviceId != null ? deviceId.equals(expEvent.deviceId) : expEvent.deviceId == null;
    }

    @Override
    public int hashCode() {
        int result = excpCode;
        result = 31 * result + (deviceId != null ? deviceId.hashCode() : 0);
        return result;
    }
}
